In computer graphics, texture mapping for, in order to improve the power of expression of a polygon mainly used to express a three-dimensional model, assigning a two-dimensional image to the inside of the polygon to draw the polygon is known. When drawing a polygon by using texture mapping, data including the position coordinates of each of vertices within an output image and coordinates within a texture image which are brought into correspondence with each of the vertices (referred to as texture coordinates from here on) are prepared. Then, to each pixel located inside the polygon connecting among the vertices on the output image are assigned texture coordinates which are interpolated from the texture coordinates of the vertices. Finally, a pixel value is extracted from the texture image by using the texture coordinates assigned to above-mentioned each pixel and is copied to the output image, so that an output image in which the inside of the polygon is filled with the same pattern as the texture image is acquired.
In the texture mapping, the texture image can be repeatedly mapped within the polygon by assigning texture coordinates exceeding a range in which the texture image is defined to each vertex. Therefore, when repeatedly drawing an image having an identical pattern within the polygon, because there is no necessity to prepare a texture image in which the pattern is drawn repeatedly, and only one texture image is sufficient to repeatedly draw an image having the single pattern within the polygon, it is known that the data volume can be reduced.
On the other hand, it is known that when mapping different texture images onto a plurality of polygons, respectively, the use of a method of combining the plurality of texture images into a single texture image, and assigning texture coordinates in the single texture image into which the plurality of texture images are combined to each of the vertices of each polygon to draw the texture image makes it possible to draw the single texture image at a higher speed than that when using a method of preparing the plurality of texture images to draw these texture images. However, when using the above-mentioned single texture image into which the plurality of texture images are combined, specifying texture coordinates outside the area where the texture image is defined results in repetitions of mapping of the entire single texture image into which the plurality of texture images are combined onto the polygons, and each yet-to-be-combined texture image, i.e., a part of the single texture image into which the plurality of texture images are combined cannot be repeatedly mapped onto the polygons.
To solve this problem, when computing texture coordinates to be assigned to each pixel within a polygon on an output image, a conventional texture mapping device described in, for example, patent reference 1 adds a process of setting higher-order bits of the texture coordinates to 0 and adding an offset to the texture coordinates to select a rectangular area from a texture image and repeatedly map only this area onto the polygon.